#ifndef TUPLA_H_INCLUDED
#define TUPLA_H_INCLUDED

#include <iostream>
#include <cassert>
#include <cstdlib>
using namespace std;


template<class T,class U>
class tupla{
    public:
    T first;
    U second;

    tupla();
    tupla(const T& prim, const U& seg);
    tupla(const tupla<T,U>& t);
    void mostrar(ostream& os) const;
    bool operator==(const tupla<T,U>& t) const;
    ostream & operator<<(ostream &os) const;


};


template<class T,class U>
ostream& operator<<(ostream& out, const tupla<T,U>& t){
	t.mostrar(out);
	return out;
}


template<class T,class U>
tupla<T,U>::tupla(){
}


template<class T,class U>
tupla<T,U>::tupla(const T& prim, const U& seg) : first(prim),second(seg){
}


template<class T,class U>
tupla<T,U>::tupla(const tupla<T,U>& t) : first(t.first), second(t.second){

//    first=t.first;
//    second=t.second;

}

template<class T,class U>
void tupla<T,U>::mostrar(ostream& os) const{
    os << "< " << first << ", " << second << " >";
}

template<class T,class U>
bool tupla<T,U>::operator==(const tupla<T,U>& t) const{

    bool igual;

    igual= ((first ==t.first) && (second == t.second));


    return igual;
}




template<class T,class U>
ostream& tupla<T,U>::operator<<(ostream &os) const{
    this.mostrar(os);
    return os;
}


#endif // TUPLA_H_INCLUDED
